package com.wlyuan.open.scanner.repository;

import com.wlyuan.open.scanner.domain.address.Address;

import java.util.List;
import java.util.Map;

/**
 * @author lijing
 */
public interface AddressRepository {

    /**
     * 获取地址
     *
     * @param sourceIds   客户id集合/收货方id集合/线上承运商id集合 / 线下承运商id集合
     * @param addressType AddressTypeEnum.CUSTOMER.val / AddressTypeEnum.RECEIVINGADDRESS.val/ AddressTypeEnum.ONLINE_CARRIER.val / AddressTypeEnum.OFFLINE_CARRIER.val
     * @return
     */
    Map<Long, List<Address>> getAddressMap(List<Long> sourceIds, Integer addressType);

    /**
     * 获取地址
     *
     * @param sourceId
     * @param addressType
     * @return
     */
    Map<Long, List<Address>> getAddress(Long sourceId, Integer addressType);

    /**
     * 根据地址id获取信息
     *
     * @param addressId
     * @return
     */
    Address getById(Long addressId);

}
